package com.yun.zf.admin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.admin.dto.customer.CustomerAgentDto;
import com.yun.zf.common.admin.model.customer.CooperationMo;
import com.yun.zf.common.admin.model.customer.CustomerAgentInfoMo;
import com.yun.zf.common.app.domain.ZfCustomerAgent;

import java.util.List;

/**
 * <p>
 * 客户授权业务员表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-03-30
 */
public interface ZfCustomerAgentService extends IService<ZfCustomerAgent> {

    public  int addCustomerAgent(ZfCustomerAgent customerAgent);

    public  int checkAuthorize(Long customerId,int  agentNo,Long provCode,Long cityCode);

    /**
     * 向维护人发起合作
     * @param proCode
     * @param cityCode
     * @param customerId 客户id
     * @param refNo  维护人工号
     * @param refName  维护人姓名
     * @return
     */
    public int  referCustomers(Long proCode, Long cityCode, Long customerId,int refNo,String refName);



    /**
     * 验证是否为找房经纪人,如果没有数据，则直接返回不能推荐
     * @param proCode
     * @param cityCode
     * @param customerId
     * @param agentNo
     * @return
     */
    public  int isBroker(Long proCode, Long cityCode, Long customerId,int agentNo);

    public List<CustomerAgentInfoMo> getCustomerInfo(Long proCode, Long cityCode, Long customerId);

    int acceptOrRefuse(Long caId,int ar,Long proCode, Long cityCode);

    /**
     * 合作列表
     * @return
     */
    Page<CustomerAgentDto>  cooperationList(CooperationMo c, Long proCode, Long cityCode);
}
